<?php $all_session = $this->session->all_userdata(); ?>
<!DOCTYPE html>
<!-- saved from url=(0056)http://startbootstrap.com/templates/simple-sidebar.html# -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>Panel</title>
<script src="<?php echo base_url();?>js/chart.js"></script>
<?php $this->load->view('panel_head');?>
</head>

<body onload="startTime()">
<?php $this->load->view('panel_header');?>
<div style="height:46px;"></div>
<div id="wrapper"> 
  
  <!-- Sidebar -->
  <div id="sidebar-wrapper">
    <?php $this->load->view('panel_sidebar');?>
  </div>
  
  <!-- Page content -->
  <div id="page-content-wrapper">
    <div class="content-header">
      <h1><span class="glyphicon glyphicon-file"></span>&nbsp;log file</h1>
    </div>
    <!-- Keep all page content within the page-content inset div! -->
    
    <div class="page-content inset">
     
       <div class="pagination" style="float:left; margin:0 0 1em 0; padding:0;">
        <?php 	echo $this->pagination->create_links(); ?>
        
        
      </div><!-- pagination -->
     
     
     <?php echo form_open('plogfile/index');?>
      <div style="float:right;"> 
    <select class="form-control" name="log_status" onChange="this.form.submit()">
    
    	   <?php if(@$all_session['log_status'] != '') { ?>
           		<option value="<?php echo @$all_session['log_status']; ?>">-- <?php echo @$all_session['log_status']; ?> --</option>
           <?php } ?>
            
            
           <option value="all">All</option>
           <option value="Pass">Pass</option>
           <option value="Fail">Fail</option>
           
           
           
    </select>
   </div>
     <?php echo form_close();?>
     
     
      <div>      
        <table class="table table-bordered table-hover" style="background-color:#fff;">
          
          <tr class="info" align="center">
            <td width="15%" align="left" ><strong>Date</strong></td>
            <td width="35%"><strong>Url</strong></td>
            <td width="25%"><strong>Action</strong></td>
            <td width="5%"><strong>Status</strong></td>
            <td width="10%"><strong>User name</strong></td>
            <td width="10%" ><strong> IP</strong></td>
          </tr>
        
           <?php $i = 0; ?>
      		<?php foreach($log_file as $log_file_2) { ?>
          <tr>
            <td><?php echo $log_file_2['log_date'];?></td>
            <td><a href="<?php echo $log_file_2['log_url'];?>"><?php echo $log_file_2['log_url'];?></a></td>
            <td>           
				<?php echo $log_file_2['log_action'];?>
                <?php if($log_file_2['log_target'] != '') { ?> 
                	</br>
               		<?php echo '('.$log_file_2['log_target'].')' ;?>
           		<?php } ?>
           
            
            </td>    
            <td align="center"><?php if($log_file_2['log_status'] == 'Pass') { ?><font color="#009900"><?php echo $log_file_2['log_status'];?></font><?php } else { ?><font color="#ff0000"><?php echo $log_file_2['log_status'];?></font><?php } ?></td>          
            <td><?php echo $log_file_2['mem_name'];?></td>
            <td><?php echo $log_file_2['log_ip'];?></td>
          </tr>
           <?php $i++; } ?>
             <?php if ($log_file == null) { ?>
          		<tr>
                <td colspan="6" align="center">- No Data -</td>
                </tr>
            <?php } ?>
        </table>
      
      </div>
      <!-- <div class="table-responsive"> --> 
      

      <!-- Delete-->
<div class="modal fade " id="delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel">Delete</h4>
      </div>
      <div class="modal-body">
        <table width="100%">
          <tr>
            <td  height="35em" style="vertical-align:top;">Are you sure you want to delete this?</td>
          </tr>
          <tr>
            <td align="right" ><button type="button" class="btn btn-danger">Delete</button>
              <button type="button" class="btn btn-default" data-dismiss="modal">Cancle</button></td>
          <tr>
        </table>
      </div>
    </div>
  </div>
</div>
<!-- Delete--> 

      
    </div>
    <!-- <div class="page-content inset"> --> 
    
  </div>
  <!--  <div id="page-content-wrapper"> --> 
  
</div>
<!-- <div id="wrapper"> --> 


<!-- Custom JavaScript for the Menu Toggle --> 
<script>
    $("#menu-toggle").click(function(e) {
        e.preventDefault();
        $("#wrapper").toggleClass("active");
    });
</script> 

<!-- checkbox --> 
<script>
$('#select-all').click(function(event) {   
    if(this.checked) {
        // Iterate each checkbox
        $(':checkbox').each(function() {
            this.checked = true;                        
        });
    }else{
		$(':checkbox').each(function() {
			this.checked = false;
		});
	}
});
</script>
</body>
</html>